﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace S.Transfer.Infrastructure
{
    public interface IBaseRepository<T>
    {
        #region 异步增删改查
        Task<bool> AddAsync(T t);
        Task<bool> DeleteAsync(int id);
        Task<bool> UpdateAsync(T t);
        Task<List<T>> GetAllAsync();
        /// <summary>
        /// 批量添加
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<bool> AddRange(List<T> ts);
        #endregion
    }
}
